package com.briup.pts.web.controller;

import com.briup.pts.result.Result;
import com.briup.pts.service.AnalysisService;
import io.swagger.annotations.Api;
import org.apache.ibatis.annotations.Results;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@Api(tags = "首页大屏模块")
@RestController
@RequestMapping("/analysis")
public class AnalysisController {
    @Autowired
    AnalysisService analysisService;

    @GetMapping("/count")
    public Result countNum(){
//        return Result.success(analysisService.countNum());
        return Result.success(analysisService.count()); //cgx
    }

    @GetMapping("/countSales")
    public Result countSales(){
        return Result.success(analysisService.countSales());
    }

    @GetMapping("/countDisease")
    public Result countDisease(){
        return Result.success(analysisService.countDisease());
    }

    @GetMapping("/indexCount")
    public Result countWeight(){
        return Result.success(analysisService.countWeight());
    }



}